<!DOCTYPE html	PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui" template="/template/template_dialog.xhtml">
	<ui:define name="head">
		<title>上传文件</title>
	</ui:define>
	<ui:define name="content">
		<div class="col-sm-12" style="height: 300px">
			<p:tooltip />
			<h:form id="uploadFileForm">
				<p:messages id="messages" showDetail="true" autoUpdate="true" closable="true" />
				<h:inputHidden value="#{fileUploadManagerController.oid}" />
				<p:fileUpload label="选择" uploadLabel="上传" cancelLabel="取消"
					fileUploadListener="#{fileUploadManagerController.handleFileUpload}" mode="advanced" />
				<p:commandButton icon="ui-icon-disk" style="float:right;"
					actionListener="#{fileUploadManagerController.returnRecordAttachments}" value="关闭并刷新">
				</p:commandButton>
			</h:form>
		</div>
	</ui:define>
	<ui:define name="contentend">
		<script>
			setInterval("timeOut()", "2000")
			function timeOut() {
				setTimeout("messageHide()", 4000);
			}
			function messageHide() {
				var box = document.getElementById("uploadFileForm:messages");
				box.style.display = "none";
			}
		</script>
	</ui:define>
</ui:composition>
